package sesi.ejava.control;

import sesi.ejava.bcam.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

/**
 * Classe de contrôle des paramètres du système
 * @author dante
 *	
 */
public class ControlActivity extends Activity {
	
	private ImageView imgClimate ;
	private ImageView imgLights  ;
	private ImageView imgComfort ;
	private ImageView imgWarning ;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.control_layout);
		
		imgClimate = (ImageView)findViewById (R.id.imgClim   ) ;  
		imgLights  = (ImageView)findViewById (R.id.imgLights ) ;
		imgComfort = (ImageView)findViewById (R.id.imgComfort) ;
		imgWarning = (ImageView)findViewById (R.id.imgWarning) ;
		
		imgClimate.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				Intent climateControlIntent = new Intent(v.getContext(),
					ClimateControlActivity.class);
				startActivity(climateControlIntent);
			}		
		});
		imgLights.setOnClickListener (new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent lightsIntent = new Intent(v.getContext(),
						LightsActivity.class);
				startActivity(lightsIntent) ;
			}
		});
		imgComfort.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent comfortIntent = new Intent(v.getContext(),
						ComfortActivity.class);
				startActivity (comfortIntent) ;
			}
		});
		imgWarning.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent warningIntent = new Intent(v.getContext(),
						WarningActivity.class);
				startActivity (warningIntent) ;
			}
		});
		
		
	}

	protected void onStart() {
		super.onStart();
		//TODO
	}
	
	@Override
	protected void onPause() {
		super.onPause();
	}
	
	@Override
	protected void onResume() {
		super.onResume();
	}
	
	
}
